package MathCore.Operands;

import MathCore.Lexeme;
import MathCore.Operand;
import MathCore.Real;

public class Constant extends Operand
{
	private Operand value;

	public Constant(Real val, String name)
	{
		value = new Number(val);
		this.name = name;
		editable = false;
	}

	public Constant(Operand val, String name)
	{
		value = val;
		this.name = name;
		editable = false;
	}

	public String toString()
	{
		return name;
	}

	public Lexeme clone()
	{
		return new Constant(value, name);
	}

	public Operand get()
	{
		return value;
	}
}
